import request from '@/utils/request'

// 电梯关系

// 申请备案
export function fetchApplyFiling(data) {
  return request({
    url: '/masterdata/maElevatorrelation/applyFiling',
    method: 'post',
    params: {},
    data,
    port: { ENV_PORT: 8003 },
    ajaxType2: 'reqPost'

  })
}

// 备案复核通过
export function fetchApplyPassed(data) {
  return request({
    url: '/masterdata/maElevatorrelation/applyPassed',
    method: 'post',
    params: {},
    data,
    port: { ENV_PORT: 8003 },
    ajaxType2: 'reqPost'

  })
}

// 备案复核拒绝
export function fetchApplyRejected(data) {
  return request({
    url: '/masterdata/maElevatorrelation/applyRejected',
    method: 'post',
    data,
    port: { ENV_PORT: 8003 },
    ajaxType2: 'reqPost'

  })
}

// 绑定
export function bindElevator(data) {
  return request({
    url: '/masterdata/maElevatorrelation/bind',
    method: 'post',
    params: {},
    data,
    port: { ENV_PORT: 8003 },
    ajaxType2: 'reqPost'

  })
}

// 重新绑定（合同延续）
export function rebindElevator({ id }) {
  return request({
    url: '/masterdata/maElevatorrelation/rebind',
    method: 'post',
    params: { id },
    port: { ENV_PORT: 8003 },
    ajaxType2: 'reqPost'

  })
}

// 解绑
export function unbindElevator({ id }) {
  return request({
    url: '/masterdata/maElevatorrelation/unbind',
    method: 'post',
    params: { id },
    port: { ENV_PORT: 8003 },
    ajaxType2: 'reqPost'

  })
}

// 查询电梯关系详情
export function relationDetail(id) {
  return request({
    url: '/masterdata/maElevatorrelation/detail',
    method: 'get',
    params: { id },
    port: { ENV_PORT: 8003 },
    ajaxType2: 'reqGet'
  })
}
